package com.casic.ops.service.api;

import com.casic.ops.consts.history.HistoryOperator;
import com.casic.ops.consts.history.HistoryValueType;
import com.casic.ops.entity.domain.OpsResult;
import com.casic.ops.entity.request.HistoryValueRequest;
import com.casic.ops.entity.vo.HistoryValueVO;
import com.orion.lang.wrapper.DataGrid;

import java.util.List;


/**
 * @ClassName ops-platform
 * @Description 历史值api
 * @Author mianbin
 * @Date 2022/5/31 10:59
 * @Version 1.0
 **/
public interface HistoryValueService {

    /**
     * 添加历史值快照
     *
     * @param valueId      valueId
     * @param valueType    valueType
     * @param operatorType operatorType
     * @param beforeValue  beforeValue
     * @param afterValue   afterValue
     */
    void addHistory(Long valueId, HistoryValueType valueType, HistoryOperator operatorType, String beforeValue, String afterValue);

    /**
     * 值列表
     *
     * @param request request
     * @return rows
     */
    OpsResult<List<HistoryValueVO>> list(HistoryValueRequest request);

    /**
     * 回滚
     *
     * @param id id
     */
    void rollback(Long id);

}
